<?php

// Define path to public_html directory (adicionado PC4)
defined('PUBLIC_PATH')
    || define('PUBLIC_PATH', realpath(dirname(__FILE__)));
// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define path to library directory (adicionado PC4)
defined('LIB_PATH')
    || define('LIB_PATH', '../../../ZendFramework-1.11.9/library/');

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/models'),
    realpath(APPLICATION_PATH),
    realpath(LIB_PATH),
    get_include_path(),
)));


// Registra o Autoloader para carregar qualquer classe no include_path
require_once 'Zend/Loader/Autoloader.php';
$autoload = Zend_Loader_Autoloader::getInstance();
$autoload->setFallbackAutoloader(true);
$autoload->pushAutoloader(new PC4_Util_Autoload());

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
            ->run();
			